package sheji.proxy1;

/**
 * @author lj
 * @Description: 静态代理
 * @date 2020-10-29 21:53
 * @QQ 851477108
 */


public class StaticProxy implements SaleComputer{
    private volatile SaleComputer target;

    public StaticProxy(SaleComputer target){
        this.target = target;
    }

    @Override
    public void sale() {
        if (target!=null){
            System.out.println("man say invoked at : "+System.currentTimeMillis());
            target.sale();
        }
    }
}
